package com.hnkywl.sts.action.xtgl;

import com.hnkywl.sts.entity.xtgl.Czrz;
import com.hnkywl.sts.entity.xtgl.Dlrz;
import com.hnkywl.sts.service.sys.YgService;
import com.hnkywl.sts.service.xtgl.CzrzService;
import com.hnkywl.sts.service.xtgl.DlrzService;
import net.ruixin.web.struts2.SimpleActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-5-8
 * Time: 下午4:07
 * To change this template use File | Settings | File Templates.
 */
@Namespace("/xtgl/czrz")
public class CzrzAction extends SimpleActionSupport {
    private CzrzService czrzService;
    //登录日志实例
    private Czrz czrz;
    //用户Id
    private Long yhId;
    //用户姓名
    private String yhXm;
    //登录时间
    private Date czrq;
    //分页组件 起始位置
    private int page;
    //分页组件 页面大小
    private int rows = 10;

    private Long czrzId;

    @Action("czrzList")
    public void czrzList() {
        this.renderJson(this.czrzService.findCzrzList(yhId, yhXm, czrq, page, rows));
    }
    @Action("czrz_view")
    public String czrzViewContent() {
        //进入update页面
//        ygId = YgService.getCurrentYg().getId();
        czrz = czrzService.findCzrzDetail(czrzId);
        return SUCCESS;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public Long getCzrzId() {
        return czrzId;
    }

    public void setCzrzId(Long czrzId) {
        this.czrzId = czrzId;
    }

    public Czrz getCzrz() {
        return czrz;
    }

    public void setCzrz(Czrz czrz) {
        this.czrz = czrz;
    }

    public Long getYhId() {
        return yhId;
    }

    public void setYhId(Long yhId) {
        this.yhId = yhId;
    }

    public String getYhXm() {
        return yhXm;
    }

    public void setYhXm(String yhXm) {
        this.yhXm = yhXm;
    }

    public Date getCzrq() {
        return czrq;
    }

    public void setCzrq(Date czrq) {
        this.czrq = czrq;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    @Autowired
    public void setCzrzService(CzrzService czrzService) {
        this.czrzService = czrzService;
    }
}
